const waitTime = (time = 100) => {
  return new Promise(resolve => {
    setTimeout(() => {
      resolve(true);
    }, time);
  });
};

export default {
  // 列表接口
  'POST /api/demandComplain/getDemandComplainList': async (req, res) => {
    await waitTime(300);
    res.send({
      code: 200,
      msg: 'ok',
      data: {
        pageNum: 1,
        pageSize: 10,
        total: 100,
        list: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
      },
    });
  },

  // 查询订货用户列表
  'POST /api/demandComplain/goodsUser': async (req, res) => {
    await waitTime(300);
    res.send({
      code: 200,
      msg: 'ok',
      data: [
        { key: 1, name: '宝钢股份' },
        { key: 2, name: '宝日汽车板' },
        { key: 3, name: '武钢有限' },
        { key: 4, name: '湛江钢铁' },
        { key: 5, name: '梅钢' },
        { key: 6, name: '梅钢南分' },
        { key: 7, name: '武钢日铁' },
        { key: 8, name: '宝鲁分公司' },
        { key: 9, name: '烟台鲁宝' },
        { key: 10, name: '黄石公司' },
        { key: 11, name: '宁波宝新' },
        { key: 12, name: '宝钢不锈' },
        { key: 13, name: '宝钢德胜' },
        { key: 14, name: '宝钢特钢' },
        { key: 15, name: '宝武特冶' },
        { key: 16, name: '宝特长材' },
        { key: 17, name: '宝特韶关' },
        { key: 18, name: '宝武铝业' },
        { key: 19, name: '宝钢国际' },
        { key: 20, name: '海外公司' },
        { key: 21, name: '外部客户/供应商' },
        { key: 22, name: '宝通钢铁' },
      ],
    });
  },

  // 查询订货用户列表
  'POST /api/demandComplain/getMarketTypeList': async (req, res) => {
    await waitTime(300);
    res.send({
      code: 200,
      msg: 'ok',
      data: [
        { key: 1, name: '普通热轧' },
        { key: 2, name: '普通热轧（汽车板专用）' },
        { key: 3, name: '普通热轧（热处理专用）' },
        { key: 4, name: '厚板' },
        { key: 5, name: '普通冷轧' },
        { key: 6, name: '冷轧薄板' },
        { key: 7, name: '镀锡基板' },
        { key: 8, name: '轧硬卷' },
        { key: 9, name: '普通热镀锌' },
        { key: 10, name: '镀铝锌' },
        { key: 11, name: '普通电镀锌' },
      ],
    });
  },

  // 信息状态列表
  'POST /api/demandComplain/getInformationStatusList': async (req, res) => {
    await waitTime(300);
    res.send({
      code: 200,
      msg: 'ok',
      data: [
        { key: 1, name: '录入' },
        { key: 2, name: '提交' },
        { key: 3, name: '需求抱怨需方撤销' },
        { key: 4, name: '需求抱怨回退' },
        { key: 5, name: '异议回退' },
        { key: 6, name: '补全判定' },
        { key: 7, name: '补全提交' },
      ],
    });
  },
};
